package com.enjoyor.soa.traffic.core.tpcms.mapper.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.enjoyor.soa.traffic.core.tpcms.constant.InfoAlarmRedisSqlId;
import com.enjoyor.soa.traffic.core.tpcms.domain.InfoAlarmRedis;
import com.enjoyor.soa.traffic.core.tpcms.domain.InfoAlarmRedisAll;
import com.enjoyor.soa.traffic.core.tpcms.mapper.IInfoAlarmRedisMapper;
import com.enjoyor.soa.traffic.frame.support.mybatis.mapper.impl.BaseMapper;

@Service
@Transactional
public class InfoAlarmRedisMapper extends BaseMapper<InfoAlarmRedis> implements IInfoAlarmRedisMapper {
    /*
     * @Override public List<InfoAlarmRedis> getAlarmRedisByCard(String
     * passCardId){ Map<String, Object> map = new HashMap<String, Object>();
     * map.put("passCardId", passCardId); return
     * sqlSessionTemplate.selectList(getSqlName(InfoAlarmRedisSqlId.
     * SQL_SELECT_REDIS_BYCARD), map); }
     */

    @Override
    public List<InfoAlarmRedisAll> getAlarmRedisByApply(String passApplyId) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("passApplyId", passApplyId);
        return sqlSessionTemplate.selectList(getSqlName(InfoAlarmRedisSqlId.SQL_SELECT_REDIS_BYAPPLY), map);
    }

    /*
     * @Override public int deleteRedisByVehicle(String licenseNumber) { return
     * sqlSessionTemplate.delete(getSqlName(InfoAlarmRedisSqlId.
     * SQL_DELETE_BYVEHICLE), licenseNumber); }
     * @Override public List<InfoAlarmRedis> getAlarmRedisList(Map<String,
     * Object> map){ return
     * sqlSessionTemplate.selectList(getSqlName(InfoAlarmRedisSqlId.
     * SQL_SELECT_LIST), map); }
     */

    /*
     * @Override public void insertAlarmRedis(InfoAlarmRedis infoAlarmRedis) {
     * Map<String,Object> map = new HashMap<String,Object>();
     * map.put("licenseNumber", infoAlarmRedis.getLicenseNumber());
     * List<InfoAlarmRedis> alarmRedisList = this.getAlarmRedisList(map);
     * if(alarmRedisList.size() > 0) {
     * super.updateByIdSelective(infoAlarmRedis); }else { String redisId = "S" +
     * TimeHelper.getUniqueString(); infoAlarmRedis.setRedisId(redisId);
     * super.insert(infoAlarmRedis); } }
     */

    @Override
    public List<InfoAlarmRedisAll> getAlarmRedisAll() {
        return sqlSessionTemplate.selectList(getSqlName(InfoAlarmRedisSqlId.SQL_SELECT_REDIS_ALL));
    }

}
